/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.pstreets.practices.demo;

import android.app.Activity;
import android.widget.Toast;
import com.google.inject.Inject;
import com.mapdigit.practices.compositeui.Presenter;
import com.mapdigit.practices.compositeui.WorkItem;
import com.pstreets.practices.demo.child.DummyClass;

/**
 *
 * @author jshen
 */
public class DemoViewPresenter extends Presenter<IDemoView>{
    
    @Inject Activity context;
    @Inject  
    public DemoViewPresenter(DemoRootWorkItem workItem){
        this.workItem=workItem;

    }
    
    public void handleOnClick(){
         Toast.makeText(context, "Custom event1", 
    			Toast.LENGTH_LONG).show();
        View.setTitle("terte");
        
        DummyClass dummy=new DummyClass();
        
        WorkItem wi=workItem.getMatchedWorkItem(dummy.getClass());
        wi=workItem.getMatchedWorkItem(this.getClass());
        
    }
}
